package com.googlecode.placesapiclient.client.entity;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

/**
 * Properties description from https://developers.google.com/places/documentation/details#PlaceDetailsResults
 *
 */
public class PlaceDetails extends Place {

    public static final String LONG_SUFFIX = "_LONG";
    public static final String SHORT_SUFFIX = "_SHORT";

    private String website;
    private String url;

    private String utcOffset;
    /**
     * String containing the human-readable address of this place. Often this address is equivalent to the "postal address,"
     * which sometimes differs from country to country. This address is generally composed of one or more address_component fields.
     */
    private String formattedAddress;
    /**
     * Contains the Place's phone number in international format. International format includes the country code, and is prefixed with the plus
     */
    private String internationalPhoneNumber;
    private String formattedPhoneNumber;
    private Map<String, String> addressComponentMap;

    public PlaceDetails() {
        openingHours = new OpeningHours();
        typeList = new ArrayList<String>();
        addressComponentMap = new HashMap<String, String>();
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Place{");
        sb.append("id='").append(id).append('\'');
        sb.append(", icon='").append(icon).append('\'');
        sb.append(", name='").append(name).append('\'');
        sb.append(", rating=").append(rating);
        sb.append(", vicinity='").append(vicinity).append('\'');
        sb.append(", latitude=").append(latitude);
        sb.append(", longitude=").append(longitude);
        sb.append(", openingHours=").append(openingHours);
        sb.append(", typeList=").append(typeList);
        sb.append('}');
        return sb.toString();
    }

    public String getWebsite() {
        return website;
    }

    public void setWebsite(String website) {
        this.website = website;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUtcOffset() {
        return utcOffset;
    }

    public void setUtcOffset(String utcOffset) {
        this.utcOffset = utcOffset;
    }

    public String getFormattedAddress() {
        return formattedAddress;
    }

    public void setFormattedAddress(String formattedAddress) {
        this.formattedAddress = formattedAddress;
    }

    public String getFormattedPhoneNumber() {
        return formattedPhoneNumber;
    }

    public void setFormattedPhoneNumber(String formattedPhoneNumber) {
        this.formattedPhoneNumber = formattedPhoneNumber;
    }

    public Map<String, String> getAddressComponentMap() {
        return addressComponentMap;
    }

    public String getInternationalPhoneNumber() {
        return internationalPhoneNumber;
    }

    public void setInternationalPhoneNumber(String internationalPhoneNumber) {
        this.internationalPhoneNumber = internationalPhoneNumber;
    }
}
